package factory

import pb "gitee.com/micro-services/protocol/user/server"

type TokenFactory interface {
	GenerateToken(userId uint64, platform string, key map[string]interface{}) (*pb.GenerateTokenRsp, error)
	CheckToken(userId uint64, token string) (bool, error)
	ResolveToken(userId uint64, token string) (map[string]interface{}, error)
	RefreshToken(userId uint64, token string) (*pb.GenerateTokenRsp, error)
}

type UserRoleFactory interface {
	CheckUserRole(userId uint64, token, urlPath string) (bool, error)
}

type WxUserFactory interface {
	GetWxUserInfo(code string) (*pb.GetWxUserInfoRsp, error)
	GetWxUserToken(platform string, userId uint64) (string, error)
}
